<template>
    <div id="content">
        <h1>{{newsinfo.title}}</h1>
        <div>
            <span>{{newsinfo.add_time}}</span>
            <span>{{newsinfo.click}}次浏览</span>
        </div>
        <div v-html="newsinfo.content"></div>
    </div>
</template>
<style scoped>
</style>
<script>
    export default{
        data(){
            return {
                newsinfo:{}
            }
        },
        methods:{
            getnewsinfo:function () {
                let url='http://182.254.146.100:8899/api/getnew/'+this.$route.params.newid
                this.$http.get(url)
                    .then((data)=>{
                    this.newsinfo=data.body.message[0]

                    })
            }

        },
        created(){
            this.getnewsinfo()
        }

    }
</script>
